Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.18] [Security Solution] Fix editing in KQL Query Bar (#208212) #211803

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.18:

Questions ?

Please refer to the Backport tool documentation

**Partially resolves: elastic#203523**

## Summary

Fixing the issue of KQL query bar edit component not showing properly
long multiline KQL queries.

The query now isn't fully visible, and it's not possible to navigate
with Up/Down keyboard keys. It's also not possible to scroll down, as
the component doesn't allow to insert new line symbols.

I am fixing the behavior by:
- setting the `bubbleSubmitEvent={true}` so that the key press can
propagate to higher components and be served properly. This fixes the
problem of not allowing to enter new lines.
- I am not touching the broken behavior of Up/Down arrow keys, which
intercepts the event and instead of moving the cursor, iterates items in
the Suggestions panel, which is counterintuitive. Separate issue will be
created for the Kibana Visualization team.
- I am modifying one css style in Kibana Visualization to set height to
and adding a class to set proper alignment of buttons.

# BEFORE
- Not possible to insert new lines.
- Arrow DOWN takes focus to Suggestions Panel, then together with Arrow
UP it is used to iterate the suggestions
- When textarea grows it gets hidden below the parent's panel

https://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9

# AFTER
- Possible to insert new lines
- Behavior of DOWN / UP Arrows stays the same
- When textarea grows the whole panel resizes

https://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2

https://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a
(cherry picked from commit 8159319)
@kibanamachine kibanamachine merged commit f28c44a into elastic:8.18 Feb 19, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #7 / FormFields renders correctly

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.1MB 9.1MB +427.0B
unifiedSearch 351.8KB 351.9KB +128.0B
total +555.0B

cc @jkelas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants